home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / c01lab1.zip / SIMLATRS / SSI.SPC < prev   
Text File  |  1992-11-11  |  3KB  |  71 lines

  1. -- **************************************************
  2. -- *                                                *
  3. -- *  Spacecraft_Sensor_Interface                   *  SPEC
  4. -- *                                                *
  5. -- **************************************************
  6. package Spacecraft_Sensor_Interface is
  7.  
  8.   type SPACECRAFT_SECTION is (BRIDGE, AUXILIARY_BRIDGE,
  9.                               CREW_QUARTERS, GALLEY,
  10.                               LAB1, LAB2, LAB3,
  11.                               AIRLOCK1, AIRLOCK2,
  12.                               EXPERIMENT_BAY);
  13.  
  14.   type PRESSURE is new FLOAT
  15.       range 0.0 .. 400.0;          -- psi
  16.   subtype TOLERATED_PRESSURE is PRESSURE
  17.       range 20.0 .. 80.0;
  18.  
  19.   type TEMPERATURE is new FLOAT
  20.       range -400.0 .. 2_000.0;     -- Fahrenheit
  21.   subtype TOLERATED_TEMPERATURE is TEMPERATURE
  22.       range -20.0 .. 120.0;
  23.  
  24.   type RADIATION_LEVEL is new FLOAT
  25.       range 0.0 .. 8_000.0;        -- Roentgens
  26.   subtype TOLERATED_RADIATION_LEVEL is RADIATION_LEVEL
  27.       range 0.0 .. 400.0;
  28.  
  29.   -- .................................................
  30.   -- .                                               .
  31.   -- .  Spacecraft_Sensor_Interface.Sensed_Value     .  SPEC
  32.   -- .                                               .
  33.   -- .................................................
  34.   function Sensed_Value
  35.       (Location : in SPACECRAFT_SECTION) return PRESSURE;
  36.   function Sensed_Value
  37.       (Location : in SPACECRAFT_SECTION) return TEMPERATURE;
  38.   function Sensed_Value
  39.       (Location : in SPACECRAFT_SECTION) return RADIATION_LEVEL;
  40.   --| Purpose
  41.   --|    Return sensor readings from different parts of the
  42.   --| spacecraft.
  43.   --|
  44.   --| Exceptions (none)
  45.   --| Notes
  46.   --|     If values exceed the limits set for the different
  47.   --| types, the corresponding maximum or minimum values are
  48.   --| returned.  Assume that sensor validation is performed
  49.   --| internally to these routines.
  50.  
  51.   -- .................................................
  52.   -- .                                               .
  53.   -- .  Spacecraft_Sensor_Interface.Update           .  SPEC
  54.   -- .                                               .
  55.   -- .................................................
  56.   procedure Update;
  57.   --| Purpose
  58.   --|     Examine each sensor and update its status.  This
  59.   --| update includes sensor input validation.
  60.   --|
  61.   --| Exceptions (none)
  62.   --| Notes
  63.   --|     Update must be called before calling any of the
  64.   --| Sensed_Value routines.  Update checks all sensors, so
  65.   --| the scenario is to call Update and then call all the
  66.   --| permutations of the Sensed_Value routines before
  67.   --| calling Update again.
  68.  
  69. end Spacecraft_Sensor_Interface;
  70.  
  71.